package Store;

import DataView.ClassInfo;

public class Class extends CDElement 
{
	private ClassInfo info;
	private boolean invalid = false;
	
	
	public void mkElement(ClassInfo myInfo) 
	{
		super.mkElement(myInfo);
		info=myInfo;
	}

	public ClassInfo getInfo() 
	{
		return info;
	}

	public boolean hasOperation(Operation optemp) 
	{
		for(Operation o : info.list_Operation)
			if (o.getName().compareTo(optemp.getName())==0)
					return true;
		return false;
	}

	public boolean hasAttribute(Attribute temp) 
	{
		for(Attribute a : info.list_Attribute)
			if (a.getName().compareTo(temp.getName())==0)
					return true;
		return false;
	}
	
	public Class clone()
	{
		Class clone = new Class();
		clone.mkElement(info.clone());
		return clone;
	}
}